<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="R2" rel="Chapter" href="R2.html"><title>R2</title>
</head>
<body>
<div class="navbar">&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;</div>
<h1>Module <a href="type_R2.html">R2</a></h1>

<pre><span class="keyword">module</span> R2: <code class="code"><span class="keyword">sig</span></code> <a href="R2.html">..</a> <code class="code"><span class="keyword">end</span></code></pre><div class="info module top">
Interact with radare2, ideal for utop interaction<br>
</div>
<hr width="100%">

<pre><span id="TYPEr2"><span class="keyword">type</span> <code class="type"></code>r2</span> </pre>
<div class="info ">
A running instance of r2<br>
</div>


<pre><span id="VALcommand"><span class="keyword">val</span> command</span> : <code class="type">r2:<a href="R2.html#TYPEr2">r2</a> -> string -> string</code></pre><div class="info ">
Send a command to r2, get back plain string output<br>
</div>

<pre><span id="VALcommand_json"><span class="keyword">val</span> command_json</span> : <code class="type">r2:<a href="R2.html#TYPEr2">r2</a> -> string -> Yojson.Basic.json</code></pre><div class="info ">
Send a command to r2, get back Yojson. If output isn't JSON
    parsable then raises  so make sure command starts
    with /j<br>
</div>

<pre><span id="VALopen_file"><span class="keyword">val</span> open_file</span> : <code class="type">string -> <a href="R2.html#TYPEr2">r2</a></code></pre><div class="info ">
Create a r2 instance with a given file, raises 
    if file doesn't exists<br>
</div>

<pre><span id="VALclose"><span class="keyword">val</span> close</span> : <code class="type"><a href="R2.html#TYPEr2">r2</a> -> unit</code></pre><div class="info ">
close a r2 instance<br>
</div>

<pre><span id="VALwith_command"><span class="keyword">val</span> with_command</span> : <code class="type">cmd:string -> string -> string</code></pre><div class="info ">
Convenience function for opening a r2 instance, sending a command,
    getting the result as plain string and closing the r2 instance<br>
</div>

<pre><span id="VALwith_command_j"><span class="keyword">val</span> with_command_j</span> : <code class="type">cmd:string -> string -> Yojson.Basic.json</code></pre><div class="info ">
Convenience function for opening a r2 instance, sending a command,
    getting the result as Yojson and closing the r2 instance<br>
</div>
</body></html>